<?php

/**
 * AccountOwner filter form base class.
 *
 * @package    erpcrm
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseAccountOwnerFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'sss_number'                   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'health_card_number'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'tin_number'                   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'home_development_fund_number' => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'vat_excempt_type'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'tax_codes'                    => new sfWidgetFormFilterInput(array('with_empty' => false)),
    ));

    $this->setValidators(array(
      'sss_number'                   => new sfValidatorPass(array('required' => false)),
      'health_card_number'           => new sfValidatorPass(array('required' => false)),
      'tin_number'                   => new sfValidatorPass(array('required' => false)),
      'home_development_fund_number' => new sfValidatorPass(array('required' => false)),
      'vat_excempt_type'             => new sfValidatorPass(array('required' => false)),
      'tax_codes'                    => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('account_owner_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AccountOwner';
  }

  public function getFields()
  {
    return array(
      'contact_iden'                 => 'ForeignKey',
      'sss_number'                   => 'Text',
      'health_card_number'           => 'Text',
      'tin_number'                   => 'Text',
      'home_development_fund_number' => 'Text',
      'vat_excempt_type'             => 'Text',
      'tax_codes'                    => 'Text',
    );
  }
}
